package cn.edu.sgu.www.mhxysy.service.role.impl;

import cn.edu.sgu.www.mhxysy.entity.role.RoleConfigJingmai;
import cn.edu.sgu.www.mhxysy.mapper.role.RoleConfigJingmaiMapper;
import cn.edu.sgu.www.mhxysy.service.role.RoleConfigJingmaiService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Service
public class RoleConfigJingmaiServiceImpl implements RoleConfigJingmaiService {

    private final RoleConfigJingmaiMapper roleConfigJingmaiMapper;

    @Autowired
    public RoleConfigJingmaiServiceImpl(RoleConfigJingmaiMapper roleConfigJingmaiMapper) {
        this.roleConfigJingmaiMapper = roleConfigJingmaiMapper;
    }

    @Override
    public RoleConfigJingmai selectByConfigId(Integer configId) {
        QueryWrapper<RoleConfigJingmai> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("config_id", configId);

        return roleConfigJingmaiMapper.selectOne(queryWrapper);
    }

}